﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="lstCity.ascx.cs" Inherits="Web.Cms.City.lstCity" %>
<script type="text/javascript">
    $(document).ready(function () {
        $("#<%=txtKeysearch.ClientID%>").autocomplete('/Layout/AutoComplateSearch/SearchTenCasi.ashx');
    });       
</script>
<%@ Register TagPrefix="uc1" TagName="PagingAjax" Src="~/Cms/AjaxCP/Paging.ascx" %>
<div class="fl">
    <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('../Cms/City/CityCreate.aspx','QUẢN LÝ THÀNH PHỐ',650,230,null,__doPostBack)">
        <img src="/App_Themes/Default/Images/Add_b.gif" border="0" />
    </a> 
</div>
<div style="padding-bottom: 20px; margin-left: 300px;" class="fl">
    <p class="heading">DANH SÁCH THÀNH PHỐ</p>          
</div>
<p class="clear8px"></p>
<div style="margin-left:370px;">    
    <div style="float:left;padding-right:10px;"><b>Nhập thành phố cần tìm:</b> <asp:TextBox runat="server" ID="txtKeysearch" Height="20" Width="230"></asp:TextBox></div>    
    <div style="float:left;padding-right:10px;">
        <asp:Button runat="server" 
            ID="btnTimKiem" SkinID="AdminButtonSearch" onclick="btnTimKiem_Click"/></div>
</div>
<br />
<div style="clear:both;margin-top: 25px"><asp:Label Font-Bold="true" ForeColor="red" Font-Size="11px" ID="lblMessage" runat="server"></asp:Label></div>

<br />

<asp:GridView ID="grdCity" runat="server" SkinID="AdminGridView" 
    BackColor="#ffffff" AutoGenerateColumns="false" 
    onrowcommand="grdCity_RowCommand" onrowdatabound="grdCity_RowDataBound"
>
    <Columns>               
         <asp:BoundField HeaderText="STT">
            <ItemStyle HorizontalAlign="Center" Width="20px" />
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle />
        </asp:BoundField>  
        <asp:TemplateField HeaderText="Mã số thành phố">
            <ItemStyle HorizontalAlign="Center" /> 
            <ItemTemplate>
                <%#Eval("CityId")%>
            </ItemTemplate>
        </asp:TemplateField> 
        <asp:BoundField HeaderText="Tên Thành Phố" DataField="CityName">            
        </asp:BoundField>            
        <asp:TemplateField  HeaderText="Mức Độ Ưu Tiên">            
            <ItemTemplate><%#Eval("Priority")%></ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField  HeaderText="Tình Trạng">            
            <ItemTemplate><%#Eval("IsActive")%></ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField HeaderText="Ngày chỉnh sửa" DataField="CreatedOn" HeaderStyle-Width="130">
            <ItemStyle HorizontalAlign="Center" />
            <HeaderStyle HorizontalAlign="center" />            
        </asp:BoundField>   
      
        <asp:TemplateField HeaderText="Sửa" HeaderStyle-Width="20">
            <ItemTemplate>                                                
                <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('../Cms/City/CityCreate.aspx?cityId=<%# Eval("CityId") %>','QUẢN LÝ CA SỸ',650,230,null,__doPostBack)"><img src="../App_Themes/Default/Images/edit.gif" border="0"></a>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Xóa" HeaderStyle-Width="20">
            <ItemTemplate>             
                <asp:Button ID="btnDelete" runat="server" CssClass="Icon_Delete" CommandArgument='<%# Eval("CityId") %>' CommandName="Commanddelete" OnClientClick="return confirm('Bạn có chắc chắn xóa không ?')" />                   
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<p style="text-align:center;">
    <br />            
    <asp:Label runat="server" ID="lbTotal" Font-Bold="true" Font-Size="15px" ForeColor="red"></asp:Label>   
     <asp:Label runat="server" ID="lblSearch" Font-Bold="true" Font-Size="15px" ForeColor="red"></asp:Label>            
    <br />  <br />
    <asp:Literal runat="server" ID="ltlPhanTrang"></asp:Literal>
    <br />
    <br />
</p>    
<table cellspacing="0" cellpadding="0" border="0" width="100%">       
    <tr>
        <td colspan="4" align="center" style="height: 21px">
            <br />            
            <uc1:PagingAjax ID="PagingAjax1" runat="server" />            
            <br />
        </td>
    </tr>
</table> 
